package cn.tedu._03vehicle.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class UserRegParam {
//    @NotNull(message = "用户名不能为null")
//    @NotEmpty(message = "用户名不能为空")
//    @NotBlank(message = "用户名不能为空切空白符")
    @Pattern(regexp = "^[\\u4e00-\\u9fff]{1,7}$|^[a-zA-Z0-9_]{1,14}$",message = "用户名格式不正确")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;
    @ApiModelProperty(value = "密码",required = true)
    private String password;
    @ApiModelProperty(value = "邮箱",required = true)
    private String email;
    @ApiModelProperty(value = "手机号",required = true)
    private String phone;
}
